package com.cnsuning.jobtool.jobtools.transfer;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;


public class Utils {
	private static Properties dbProperties = new Properties();

	static {
		String fileName = "src\\main\\java\\com\\cnsuning\\jobtool\\jobtools\\transfer\\db.properties";
		dbProperties = new Properties();
		try {
			//dbProperties.load(new InputStreamReader(Utils.class.getClassLoader().getResourceAsStream(fileName), "UTF-8"));
			dbProperties.load(new BufferedReader(new FileReader(fileName)));
		} catch (IOException e) {
		}
	}

	/**
	 * 获取数据库连接
	 *
	 * @param url
	 * @param userName
	 * @param password
	 * @return
	 */
	public static Connection getConnection(String driver, String url, String userName, String password) {
		Connection connection = null;
		try {
			Class.forName(driver);
			connection = DriverManager.getConnection(url, userName, password);
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return connection;
	}

	/**
	 * 关闭数据库连接
	 *
	 * @param connection
	 * @param preparedStatement
	 * @param resultSet
	 */
	public static void closeConnection(Connection connection, PreparedStatement preparedStatement,
			ResultSet resultSet) {
		if (resultSet != null) {
			try {
				resultSet.close();
			} catch (SQLException e) {
				e.printStackTrace();
			} finally {
				if (preparedStatement != null) {
					try {
						preparedStatement.close();
					} catch (SQLException e) {
						e.printStackTrace();
					} finally {
						if (connection != null) {
							try {
								connection.close();
							} catch (SQLException e) {
								e.printStackTrace();
							}
						}
					}
				}
			}
		}
	}

	/**
	 * 获取源库连接信息
	 *
	 * @param env
	 * @param dbType
	 * @return
	 */
	public static List<ConnectionInfo> getFromConnectionInfo(String env, String dbType) {
		List<ConnectionInfo> connectionInfoList = new ArrayList<ConnectionInfo>();
		if ("dev".equalsIgnoreCase(env)) {
			ConnectionInfo connectionInfo = new ConnectionInfo();
			if ("omsd".equals(dbType)) {
				connectionInfo.setUrl((String) dbProperties.get("dev.gomst1.url"));
				connectionInfo.setUserName((String) dbProperties.get("dev.gomst1.userName"));
				connectionInfo.setPassword((String) dbProperties.get("dev.gomst1.password"));
				connectionInfo.setDriver((String) dbProperties.get("db2driver"));
				connectionInfoList.add(connectionInfo);

				connectionInfo = new ConnectionInfo();
				connectionInfo.setUrl((String) dbProperties.get("dev.gomst2.url"));
				connectionInfo.setUserName((String) dbProperties.get("dev.gomst2.userName"));
				connectionInfo.setPassword((String) dbProperties.get("dev.gomst2.password"));
				connectionInfo.setDriver((String) dbProperties.get("db2driver"));
				connectionInfoList.add(connectionInfo);
			}
		}

		else

		if ("sit".equalsIgnoreCase(env)) {
			ConnectionInfo connectionInfo = new ConnectionInfo();
			if ("gomst".equals(dbType)) {
				connectionInfo.setUrl((String) dbProperties.get("sit.gomst1.url"));
				connectionInfo.setUserName((String) dbProperties.get("sit.gomst1.userName"));
				connectionInfo.setPassword((String) dbProperties.get("sit.gomst1.password"));
				connectionInfo.setDriver((String) dbProperties.get("db2driver"));
				connectionInfoList.add(connectionInfo);

				connectionInfo = new ConnectionInfo();
				connectionInfo.setUrl((String) dbProperties.get("sit.gomst2.url"));
				connectionInfo.setUserName((String) dbProperties.get("sit.gomst2.userName"));
				connectionInfo.setPassword((String) dbProperties.get("sit.gomst2.password"));
				connectionInfo.setDriver((String) dbProperties.get("db2driver"));
				connectionInfoList.add(connectionInfo);
			}
			if("omsd".equals(dbType)){
               /* ConnectionInfo connectionInfo31 = new ConnectionInfo();
                connectionInfo31.setUrl("jdbc:db2://10.47.232.245:60006/OMSDDB1:currentSchema=OMSDADM;");
                connectionInfo31.setUserName("omsdusr");
                connectionInfo31.setPassword("WMXzCe28ggHD");
                connectionInfo31.setDriver((String) dbProperties.get("db2driver"));
                connectionInfo31.setScheam("OMSDADM");
                connectionInfoList.add(connectionInfo31);
                ConnectionInfo connectionInfo32 = new ConnectionInfo();
                connectionInfo32.setUrl("jdbc:db2://10.47.232.245:60006/OMSDDB1:currentSchema=OMSDADM2;");
                connectionInfo32.setUserName("omsdusr");
                connectionInfo32.setPassword("WMXzCe28ggHD");
                connectionInfo32.setDriver((String) dbProperties.get("db2driver"));
                connectionInfo32.setScheam("OMSDADM2");
                connectionInfoList.add(connectionInfo32);*/

                ConnectionInfo connectionInfo33 = new ConnectionInfo();
                connectionInfo33.setUrl("jdbc:db2://10.47.232.245:60006/OMSDDB1:currentSchema=OMSDADM3;");
                connectionInfo33.setUserName("omsdusr");
                connectionInfo33.setPassword("WMXzCe28ggHD");
                connectionInfo33.setDriver((String) dbProperties.get("db2driver"));
                connectionInfo33.setScheam("OMSDADM3");
                connectionInfoList.add(connectionInfo33);

                ConnectionInfo connectionInfo34 = new ConnectionInfo();
                connectionInfo34.setUrl("jdbc:db2://10.47.232.245:60006/OMSDDB1:currentSchema=OMSDADM4;");
                connectionInfo34.setUserName("omsdusr");
                connectionInfo34.setPassword("WMXzCe28ggHD");
                connectionInfo34.setDriver((String) dbProperties.get("db2driver"));
                connectionInfo34.setScheam("OMSDADM4");
                connectionInfoList.add(connectionInfo34);

                ConnectionInfo connectionInfo35 = new ConnectionInfo();
                connectionInfo35.setUrl("jdbc:db2://10.47.232.245:60006/OMSDDB1:currentSchema=OMSDADM5;");
                connectionInfo35.setUserName("omsdusr");
                connectionInfo35.setPassword("WMXzCe28ggHD");
                connectionInfo35.setDriver((String) dbProperties.get("db2driver"));
                connectionInfo35.setScheam("OMSDADM5");
                connectionInfoList.add(connectionInfo35);

                ConnectionInfo connectionInfo36 = new ConnectionInfo();
                connectionInfo36.setUrl("jdbc:db2://10.47.232.245:60006/OMSDDB1:currentSchema=OMSDADM6;");
                connectionInfo36.setUserName("omsdusr");
                connectionInfo36.setPassword("WMXzCe28ggHD");
                connectionInfo36.setDriver((String) dbProperties.get("db2driver"));
                connectionInfo36.setScheam("OMSDADM6");
                connectionInfoList.add(connectionInfo36);
            }
		}

		else

		if ("pre".equalsIgnoreCase(env)) {
			if ("gomst".equals(dbType)) {
                ConnectionInfo connectionInfo = new ConnectionInfo();
				connectionInfo.setUrl((String) dbProperties.get("pre.gomstPub1.url"));
				connectionInfo.setUserName((String) dbProperties.get("pre.gomstPub1.userName"));
				connectionInfo.setPassword((String) dbProperties.get("pre.gomstPub1.password"));
				connectionInfo.setDriver((String) dbProperties.get("db2driver"));
				connectionInfoList.add(connectionInfo);
				/*connectionInfo.setUrl((String) dbProperties.get("pre.gomst1.url"));
				connectionInfo.setUserName((String) dbProperties.get("pre.gomst1.userName"));
				connectionInfo.setPassword((String) dbProperties.get("pre.gomst1.password"));
				connectionInfo.setDriver((String) dbProperties.get("db2driver"));
				connectionInfoList.add(connectionInfo);

				connectionInfo = new ConnectionInfo();
				connectionInfo.setUrl((String) dbProperties.get("pre.gomst2.url"));
				connectionInfo.setUserName((String) dbProperties.get("pre.gomst2.userName"));
				connectionInfo.setPassword((String) dbProperties.get("pre.gomst2.password"));
				connectionInfo.setDriver((String) dbProperties.get("db2driver"));
				connectionInfoList.add(connectionInfo);*/
			}

			else

			if ("omsd".equals(dbType)) {
                ConnectionInfo connectionInfo31 = new ConnectionInfo();
                connectionInfo31.setUrl((String) dbProperties.get("pre.omsddb2sever31.url"));
                connectionInfo31.setUserName((String) dbProperties.get("pre.omsddb2sever31.userName"));
                connectionInfo31.setPassword((String) dbProperties.get("pre.omsddb2sever31.password"));
                connectionInfo31.setDriver((String) dbProperties.get("db2driver"));
                connectionInfo31.setScheam(connectionInfo31.getUserName().toUpperCase());
                connectionInfoList.add(connectionInfo31);

                ConnectionInfo connectionInfo32 = new ConnectionInfo();
                connectionInfo32.setUrl((String) dbProperties.get("pre.omsddb2sever32.url"));
                connectionInfo32.setUserName((String) dbProperties.get("pre.omsddb2sever32.userName"));
                connectionInfo32.setPassword((String) dbProperties.get("pre.omsddb2sever32.password"));
                connectionInfo32.setDriver((String) dbProperties.get("db2driver"));
                connectionInfo32.setScheam(connectionInfo32.getUserName().toUpperCase());
                connectionInfoList.add(connectionInfo32);

                ConnectionInfo connectionInfo33 = new ConnectionInfo();
                connectionInfo33.setUrl((String) dbProperties.get("pre.omsddb2sever33.url"));
                connectionInfo33.setUserName((String) dbProperties.get("pre.omsddb2sever33.userName"));
                connectionInfo33.setPassword((String) dbProperties.get("pre.omsddb2sever33.password"));
                connectionInfo33.setDriver((String) dbProperties.get("db2driver"));
                connectionInfo33.setScheam(connectionInfo33.getUserName().toUpperCase());
                connectionInfoList.add(connectionInfo33);

                ConnectionInfo connectionInfo34 = new ConnectionInfo();
                connectionInfo34.setUrl((String) dbProperties.get("pre.omsddb2sever34.url"));
                connectionInfo34.setUserName((String) dbProperties.get("pre.omsddb2sever34.userName"));
                connectionInfo34.setPassword((String) dbProperties.get("pre.omsddb2sever34.password"));
                connectionInfo34.setDriver((String) dbProperties.get("db2driver"));
                connectionInfo34.setScheam(connectionInfo34.getUserName().toUpperCase());
                connectionInfoList.add(connectionInfo34);

                ConnectionInfo connectionInfo35 = new ConnectionInfo();
                connectionInfo35.setUrl((String) dbProperties.get("pre.omsddb2sever35.url"));
                connectionInfo35.setUserName((String) dbProperties.get("pre.omsddb2sever35.userName"));
                connectionInfo35.setPassword((String) dbProperties.get("pre.omsddb2sever35.password"));
                connectionInfo35.setDriver((String) dbProperties.get("db2driver"));
                connectionInfo35.setScheam(connectionInfo35.getUserName().toUpperCase());
                connectionInfoList.add(connectionInfo35);

                ConnectionInfo connectionInfo36 = new ConnectionInfo();
                connectionInfo36.setUrl((String) dbProperties.get("pre.omsddb2sever36.url"));
                connectionInfo36.setUserName((String) dbProperties.get("pre.omsddb2sever36.userName"));
                connectionInfo36.setPassword((String) dbProperties.get("pre.omsddb2sever36.password"));
                connectionInfo36.setDriver((String) dbProperties.get("db2driver"));
                connectionInfo36.setScheam(connectionInfo36.getUserName().toUpperCase());
                connectionInfoList.add(connectionInfo36);

                ConnectionInfo connectionInfo37 = new ConnectionInfo();
                connectionInfo37.setUrl((String) dbProperties.get("pre.omsddb2sever37.url"));
                connectionInfo37.setUserName((String) dbProperties.get("pre.omsddb2sever37.userName"));
                connectionInfo37.setPassword((String) dbProperties.get("pre.omsddb2sever37.password"));
                connectionInfo37.setDriver((String) dbProperties.get("db2driver"));
                connectionInfo37.setScheam(connectionInfo37.getUserName().toUpperCase());
                connectionInfoList.add(connectionInfo37);

                ConnectionInfo connectionInfo38 = new ConnectionInfo();
                connectionInfo38.setUrl("jdbc:db2://10.37.67.153:60004/omsd1");
                connectionInfo38.setUserName("omsadmol");
                connectionInfo38.setPassword("71d9PwznQnV8");
                connectionInfo38.setDriver((String) dbProperties.get("db2driver"));
                connectionInfo38.setScheam("OMADADMTMP");
                connectionInfoList.add(connectionInfo38);
            }
		}

		else

		if ("xgpre".equalsIgnoreCase(env)) {
			ConnectionInfo connectionInfo = new ConnectionInfo();
			if ("omsd".equals(dbType)) {
//				connectionInfo.setUrl((String) dbProperties.get("xgpre.gomst1.url"));
//				connectionInfo.setUserName((String) dbProperties.get("xgpre.gomst1.userName"));
//				connectionInfo.setPassword((String) dbProperties.get("xgpre.gomst1.password"));
//				connectionInfo.setDriver((String) dbProperties.get("db2driver"));
//				connectionInfoList.add(connectionInfo);
//
//				connectionInfo = new ConnectionInfo();
//				connectionInfo.setUrl((String) dbProperties.get("xgpre.gomst2.url"));
//				connectionInfo.setUserName((String) dbProperties.get("xgpre.gomst2.userName"));
//				connectionInfo.setPassword((String) dbProperties.get("xgpre.gomst2.password"));
//				connectionInfo.setDriver((String) dbProperties.get("db2driver"));
//				connectionInfoList.add(connectionInfo);


                connectionInfo = new ConnectionInfo();
                connectionInfo.setUrl("jdbc:db2://10.242.34.91:60006/OMSDPUB");
                connectionInfo.setUserName("yunwei");
                connectionInfo.setPassword("yunwei123");
                connectionInfo.setDriver("com.ibm.db2.jcc.DB2Driver");
                connectionInfo.setScheam("OMSADMOL");
                connectionInfoList.add(connectionInfo);
			}
		}
		return connectionInfoList;
	}


	/**
	 * 获取目标库myCat连接信息
	 *
	 * @param env
	 * @return
	 */
	public static ConnectionInfo getNewMyCatConnectionInfo(String env) {
		ConnectionInfo connectionInfo = new ConnectionInfo();
		if ("dev".equalsIgnoreCase(env)) {
			connectionInfo.setUrl((String) dbProperties.get("dev.mycat.url"));
			connectionInfo.setUserName((String) dbProperties.get("dev.mycat.userName"));
			connectionInfo.setPassword((String) dbProperties.get("dev.mycat.password"));
			connectionInfo.setDriver((String) dbProperties.get("mysqldriver"));
		}
		if ("sit".equalsIgnoreCase(env)) {
			connectionInfo.setUrl((String) dbProperties.get("sit.mycat.url"));
			connectionInfo.setUserName((String) dbProperties.get("sit.mycat.userName"));
			connectionInfo.setPassword((String) dbProperties.get("sit.mycat.password"));
			connectionInfo.setDriver((String) dbProperties.get("mysqldriver"));
		}

		if ("pre".equalsIgnoreCase(env)) {
			connectionInfo.setUrl((String) dbProperties.get("pre.mycat.url"));
			connectionInfo.setUserName((String) dbProperties.get("pre.mycat.userName"));
			connectionInfo.setPassword((String) dbProperties.get("pre.mycat.password"));
			connectionInfo.setDriver((String) dbProperties.get("mysqldriver"));
		}
		return connectionInfo;
	}

	/**
	 * 生成文件
	 *
	 * @param filePath
	 * @param fileName
	 * @param context
	 */
	public static void createFile(String filePath, String fileName) {
		File outFilePath = new File(filePath);
		if (!outFilePath.exists()) {
			outFilePath.mkdirs();
		}
		File outFile = null;
		BufferedWriter bufferedWriter = null;
		try {
			outFile = new File(outFilePath + "/" + "error" + ".csv");
			bufferedWriter = new BufferedWriter(new FileWriter(outFile));
			bufferedWriter.write(fileName);
			bufferedWriter.flush();
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			if (bufferedWriter != null) {
				try {
					bufferedWriter.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
	}

	public static List<String> getPubTableName(){
		List<String> tableList = new ArrayList<String>();
	    tableList.add("");
		return tableList;
		}

	public static List<String> getTableName(String createdTime) {
	    if("CREATED_TIME".equals(createdTime)){
       /*     String mysql_db = "C:\\Users\\admin\\Desktop\\20191224datamove\\shengyutables.txt";
            List<String> tableList2 = FileUtils.getFile(mysql_db);
            int length = tableList2.size();
            return tableList2.subList(180,185);*/
            List<String> list = new ArrayList<>();
            list.add("so_data_add_syn_buds_info");

            return list;
        }
        if("CREAT_TIME".equals(createdTime)){
            List<String> list = new ArrayList<>();
            //CREAT_TIME
            list.add("SO_DATA_SYN_INFO");
            list.add("STATUS_SYN_INFO");
            list.add("SO_DATA_SYN_DELI_INFO");
            list.add("SO_DATA_DIS_INFO");
            list.add("SO_DATA_NOT_MENTIONED_STATUS_INFO");
            list.add("SO_OVERSEAS_SYN_INFO");
            return list;
        }
        if("CREATE_TIME".equals(createdTime)){
            List<String> list = new ArrayList<>();
            //CREATE_TIME
            list.add("SO_ORDI_DELI_DETAIL_EXTENDS");
            list.add("SO_AUDIT_RESULT");
            list.add("SO_AUDIT_DEAL");
            list.add("SO_C_ORDI_RECGOODS_EXP_LOG");
            list.add("SO_ORDER_STATUS_SYN_SDIPA");
            list.add("SO_ORD_OMS_EXCEPTION");
            return list;
        }

        List<String> list = new ArrayList<>();
        //无时间
        list.add("SO_AUDIT_ITEM_DEAL");
        list.add("SO_ORDI_CRUXVALUE_EDIT_LOG");
        list.add("SO_ORDI_ERR_OPT_LOG");
        return list;
    }

    public static List<String> getTableName()
    {
        List<String> list = new ArrayList<>();
        list.add("SO_ORDI_MERGE_ASSOCIATE");
        list.add("SO_ORDI_MERGE");
        list.add("SO_ORDI_PACKAGE_ASSOCIATE");
        list.add("SO_PACKAGE_INFO");
        list.add("SO_DELIVER_MONITOR_INFO");
        list.add("IDX_OMS_B2C_NO_ABN");
        list.add("SO_DELIVER_NOGOODS_FOURELEMENT");
        list.add("SO_DATA_RESEND_INFO");
        list.add("INF_EXPRESS_MSG");
        list.add("IDX_ROUTER_ORDER_NO_RECORD");
        list.add("SO_DELIVER_CHECK_RULES_LOG");
        list.add("TMP_INT_LOG");
        list.add("SO_DELIVER_CHECK_RULES_ERR");
        list.add("INF_SAP_RTNCHG_ERR");
        return list;
    }

    /**
	 * 获取目标库myCat连接信息
	 *
	 * @param env
	 * @return
	 */
	public static ConnectionInfo getNewMySqlConnectionInfo(String env) {
		ConnectionInfo connectionInfo = new ConnectionInfo();
		if ("dev".equalsIgnoreCase(env)) {
			/*connectionInfo.setUrl((String) dbProperties.get("dev.mysql1.url"));
			connectionInfo.setUserName((String) dbProperties.get("dev.mysql1.userName"));
			connectionInfo.setPassword((String) dbProperties.get("dev.mysql1.password"));
			connectionInfo.setDriver((String) dbProperties.get("mysqldriver"));*/

			connectionInfo.setUrl((String) dbProperties.get("dev.mycat.url"));
			connectionInfo.setUserName((String) dbProperties.get("dev.mycat.userName"));
			connectionInfo.setPassword((String) dbProperties.get("dev.mycat.password"));
			connectionInfo.setDriver((String) dbProperties.get("mysqldriver"));
		}
		if ("sit".equalsIgnoreCase(env)) {
			connectionInfo.setUrl((String) dbProperties.get("sit.mycat.url"));
			connectionInfo.setUserName((String) dbProperties.get("sit.mycat.userName"));
			connectionInfo.setPassword((String) dbProperties.get("sit.mycat.password"));
			connectionInfo.setDriver((String) dbProperties.get("mysqldriver"));
		}

		if ("pre".equalsIgnoreCase(env)) {
			connectionInfo.setUrl((String) dbProperties.get("pre.mysql1.url"));
			connectionInfo.setUserName((String) dbProperties.get("pre.mysql1.userName"));
			connectionInfo.setPassword((String) dbProperties.get("pre.mysql1.password"));
			connectionInfo.setDriver((String) dbProperties.get("mysqldriver"));
			/*connectionInfo.setUrl((String) dbProperties.get("pre.mycat.url"));
			connectionInfo.setUserName((String) dbProperties.get("pre.mycat.userName"));
			connectionInfo.setPassword((String) dbProperties.get("pre.mycat.password"));
			connectionInfo.setDriver((String) dbProperties.get("mysqldriver"));*/
		}
        if ("xgpre".equalsIgnoreCase(env)) {
            connectionInfo.setUrl("jdbc:mysql://10.243.194.53:3306/omsddb_idx");
            connectionInfo.setUserName("sndsadmin");
            connectionInfo.setPassword("SuningRds@123");
            connectionInfo.setDriver("com.mysql.jdbc.Driver");
			/*connectionInfo.setUrl((String) dbProperties.get("pre.mycat.url"));
			connectionInfo.setUserName((String) dbProperties.get("pre.mycat.userName"));
			connectionInfo.setPassword((String) dbProperties.get("pre.mycat.password"));
			connectionInfo.setDriver((String) dbProperties.get("mysqldriver"));*/
        }

		if ("omsdpremycat".equalsIgnoreCase(env)) {
			connectionInfo.setUrl((String) dbProperties.get("pre.omsdpremycat.url"));
			connectionInfo.setUserName((String) dbProperties.get("pre.omsdpremycat.userName"));
			connectionInfo.setPassword((String) dbProperties.get("pre.omsdpremycat.password"));
			connectionInfo.setDriver((String) dbProperties.get("mysqldriver"));
			/*connectionInfo.setUrl((String) dbProperties.get("pre.mycat.url"));
			connectionInfo.setUserName((String) dbProperties.get("pre.mycat.userName"));
			connectionInfo.setPassword((String) dbProperties.get("pre.mycat.password"));
			connectionInfo.setDriver((String) dbProperties.get("mysqldriver"));*/
		}

		if ("omsdsitmycat".equalsIgnoreCase(env)) {
			connectionInfo.setUrl("jdbc:mysql://10.37.67.144:8066/OMSDDB");
			connectionInfo.setUserName("root");
			connectionInfo.setPassword("123456");
			connectionInfo.setDriver((String) dbProperties.get("mysqldriver"));
		}
		return connectionInfo;
	}


	public static Connection testGetMycatConnection(){
		String url = ((String) dbProperties.get("pre.mycat1.url"));
		String userName =((String) dbProperties.get("pre.mycat1.userName"));
		String pwd =((String) dbProperties.get("pre.mycat1.password"));
		String driver =((String) dbProperties.get("mysqldriver"));
		return getConnection(driver,url,userName,pwd);
	}


	public static Connection testGetDb2Connection(){
		String url = ((String) dbProperties.get("pre.gomst1.url"));
		String userName =((String) dbProperties.get("pre.gomst1.userName"));
		String pwd =((String) dbProperties.get("pre.gomst1.password"));
		String driver =((String) dbProperties.get("db2driver"));
		return getConnection(driver,url,userName,pwd);
	}

	public static void main(String[] args) {
		Connection connnection = testGetDb2Connection();
			String sql = " select * from so_tps_refund_info  ";
		try {
			PreparedStatement pst = connnection.prepareStatement(sql);
			ResultSet rs = pst.executeQuery();
			while(rs.next()){
				System.out.println(rs.getString("order_id"));
			}
		}catch (Exception e){
			e.printStackTrace();
		}
	}
}
